package com.mspbots.cw.amqp.model;


import com.fasterxml.jackson.databind.JsonNode;
import com.mspbots.cw.amqp.CallbackAction;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.data.annotation.Id;
import org.springframework.data.annotation.Transient;
import org.springframework.data.relational.core.mapping.Table;

import java.time.LocalDateTime;
import java.util.List;

/**
 * com.mspbots.core.ticket.TenantTicket
 *
 * @author Alex bob(https://github.com/vnobo)
 * @date Created by 2019/8/8
 */
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@Table(value = "tenant_tickets")
public class Ticket {

    @Id
    private Long id;
    private int tenantId;
    private String updatedBy;
    private Long cwId;
    private Long boardId;
    private int statusId;
    private String status;
    private int priorityId;
    private String priorityName;
    private int companyId;
    private int contactId;
    private String contactName;
    private String summary;
    private String resources;
    private int owner;
    private LocalDateTime createdTime;
    private LocalDateTime updatedTime;
    private LocalDateTime syncTime;
    private String companyName;
    private JsonNode extend;
    private JsonNode auditor;
    private JsonNode teamRoles;
    private JsonNode configurations;
    private String recordType;
    private String subBillingMethod;
    private String locationName;

    @Transient
    private CallbackAction action;

    @Transient
    private transient Long tenantUserId;
    @Transient
    private transient String tenantUserName;
    @Transient
    private transient LocalDateTime updatedTimeStart;
    @Transient
    private transient Boolean ownerNull;
    @Transient
    private transient List<Long> boardIds;
    @Transient
    private transient List<Long> statusIds;
    @Transient
    private transient Long pages;
    @Transient
    private transient Long current;
    @Transient
    private transient JsonNode records;

}
